package com.wodan.zhongjinjicang.common.orm.bytesconverter.impl;

import org.springframework.util.Assert;

import com.wodan.zhongjinjicang.common.orm.bytesconverter.Converter;

/**
 * long类型转换器
 * @ClassName: LongConverter 
 * @Description: TODO
 * @author Administrator
 * @date 2015-1-10 下午3:50:55 
 * @history 
 *
 */
public class LongConverter implements Converter {
	
	@Override
	public Object fromString(String str) {
		return Long.valueOf(str);
	}
	
	@Override
	public String toString(Object obj) {
		Assert.notNull(obj, "obj is null");
		
		return obj.toString();
	}
	
	@Override
	public boolean isNullOrEmpty(Object obj) {
		if (obj == null) {
			return true;
		} else {
			return false;
		}
	}
}
